/**
 * 
 */
package com.hexacta.hrs.repositories.feedback;

import java.util.Collection;
import java.util.List;

import org.vectrics.employee.Employee;
import org.vectrics.recruiter.job.JobFunction;

import com.hexacta.hrs.domain.feedback.Feedback;
import com.hexacta.hrs.domain.feedback.Period;
import com.hexacta.hrs.repositories.RecordObjectRepository;

/**
 * @author gvilla
 * 
 */
public interface FeedbackRepository extends RecordObjectRepository<Feedback> {

    /**
     * 
     * @return los feedbacks que pertenecen a un per�odo abierto, es decir, que
     *         a�n son modificables.
     */
    public Collection<Feedback> getOpen();

    public Collection<Feedback> getWith(Employee employee, Employee mentor, JobFunction role);

    public Collection<Feedback> findFeedbacksWithCriteria(String period, Long employeeIdCurrentUser,
            Integer jobFunctionWeightCurrentUser, Long employeeId, Long projectId, String roleId, Long mentorId,
            Long evaluatorId);

    public Collection<Employee> findAllEvaluators();

    /**
     * @param evaluatedId
     * @param evaluatorId
     * @param proyectId
     * @return
     */
    public boolean feedbackExist(Long evaluatedId, Long evaluatorId, String projectName);

    public List<Feedback> getPendingFeedbacksForRole(String role, Period period);

    public List<Feedback> getPendingFeedbacks(Period period);
}
